#ifndef __PD_HANDLER__
#define __PD_HANDLER__
#include "IO_LINK_Global_Param.h"
#include "Type_Define.h"


typedef enum{
  PD_Inactive_0,
  subPD_Inactive_0,
  PDSingle_1,
  subPDSingle_1,
  PDInInterleave_2,
  subPDInInterleave_2,
  pDOutInterleave_3,
  subPDOutInterleave_3
}PD_STATE_TYPE;

extern PD_STATE_TYPE PD_STATE[PORT_NUM];


void Event_PDTrig(uint8_t Port);

/*******输入Event*******************************/

void Event_PDTrig(uint8_t Port);

//自定义事件，当收到时从自定义子状态sub 返回原状态  //正常返回
void Event_PD_Return(uint8_t Port);
//自定义事件，当接收出错时候从自定义子状态sub 返回原状态//传输出错时候
void Event_PD_Error_Return(uint8_t Port);


void Event_PD_Conf_INACTIVE(uint8_t Port);


void Event_PD_Conf_SINGLE(uint8_t Port);
void Event_PD_Conf_INTERLEAVE(uint8_t Port);

void Event_Input_Data_Completed(uint8_t Port);

void Event_Output_Data_Completed(uint8_t Port);

void DL_PD_Init(void);


 
#endif



